/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: DcmDspSvc31Cfg.h
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: Dcm
*
*******************************************************************************/

#ifndef DCMDSPSVC31CFG_H
#define DCMDSPSVC31CFG_H

/** HEADER FILES **/
#include "DcmDspSvc31Type.h" 


/** MACRO DEFINITION **/
#define DCMDSPSVC31_REQ_DATA_MINLENGTH  4u

#define DcmDspSvc31Conf_RoutineId_Max 2u


/** TYPEDEF DEFINITION **/
typedef Std_ReturnType (*Dcm_RoutineControlFncType)(
    uint8* DataIn,
    uint8* DataOut
);

typedef Std_ReturnType (*DcmRoutineControlFncType)(
    Dcm_OpStatusType OpStatus,
    const uint8* dataInVar,
    uint8* dataOutVar,
    uint16* variableDataLength,
    Dcm_NegativeResponseCodeType* ErrorCode
);


typedef struct
{
    uint16 DcmDspRoutineSignalPos;
    uint16 DcmDspRoutineParameterSize;
}DcmDspStartRoutineInSignalType;

typedef struct
{
    uint8 DcmDspStartRoutineInSignalNum;
    DcmDspStartRoutineInSignalType* DcmDspStartRoutineInSignal;
}DcmDspStartRoutineInType;


typedef struct
{
    uint16 DcmDspRoutineSignalPos;
    uint16 DcmDspRoutineParameterSize;
}DcmDspStartRoutineOutSignalType;

typedef struct
{
    uint8 DcmDspStartRoutineOutSignalNum;
    DcmDspStartRoutineOutSignalType* DcmDspStartRoutineOutSignal;
}DcmDspStartRoutineOutType;


typedef struct
{
    DcmRoutineControlFncType DcmDspStartRoutineFnc;
    DcmDspStartRoutineInType DcmDspStartRoutineIn;
    DcmDspStartRoutineOutType DcmDspStartRoutineOut;   
}DcmDspStartRoutineType;


typedef struct
{
    uint16 DcmDspRoutineSignalPos;
    uint16 DcmDspRoutineParameterSize;
}DcmDspStopRoutineInSignalType;


typedef struct
{
    uint8 DcmDspStopRoutineInSignalNum;
    DcmDspStopRoutineInSignalType* DcmDspStopRoutineInSignal;
}DcmDspStopRoutineInType;

typedef struct
{
    uint16 DcmDspRoutineSignalPos;
    uint16 DcmDspRoutineParameterSize;
}DcmDspStopRoutineOutSignalType;

typedef struct
{
    uint8 DcmDspStopRoutineOutSignalNum;
    DcmDspStopRoutineOutSignalType* DcmDspStopRoutineOutSignal;
}DcmDspStopRoutineOutType;


typedef struct
{
    DcmRoutineControlFncType DcmDspStopRoutineFnc;
    DcmDspStopRoutineInType DcmDspStopRoutineIn;
    DcmDspStopRoutineOutType DcmDspStopRoutineOut;
}DcmDspStopRoutineType;


typedef struct
{
    uint16 DcmDspRoutineSignalPos;
    uint16 DcmDspRoutineParameterSize;
}DcmDspRequestRoutineResultsInSignalType;


typedef struct
{
    uint8 DcmDspRequestRoutineResultsInSignalNum;
    DcmDspRequestRoutineResultsInSignalType* DcmDspRequestRoutineResultsInSignal;
}DcmDspRequestRoutineResultsInType;


typedef struct
{
    uint16 DcmDspRoutineSignalPos;
    uint16 DcmDspRoutineParameterSize;
}DcmDspRequestRoutineResultsOutSignalType;


typedef struct
{
    uint8 DcmDspRequestRoutineResultsOutSignalNum;
    DcmDspRequestRoutineResultsOutSignalType* DcmDspRequestRoutineResultsOutSignal;
}DcmDspRequestRoutineResultsOutType;


typedef struct
{
    DcmRoutineControlFncType DcmDspRequestRoutineResultsFnc;
    DcmDspRequestRoutineResultsInType DcmDspRequestRoutineResultsIn;
    DcmDspRequestRoutineResultsOutType DcmDspRequestRoutineResultsOut;  
}DcmDspRequestRoutineResultsType;


typedef struct
{
    uint16 DcmDspRoutineIdentifier;
    DcmDspStartRoutineType DcmDspStartRoutine;
    DcmDspStopRoutineType DcmDspStopRoutine;
    DcmDspRequestRoutineResultsType DcmDspRequestRoutineResults;
}DcmDspRoutineType;

/** LOCAL DATA DEFINITION **/
extern const DcmDspRoutineType DcmDspRoutine[DcmDspSvc31Conf_RoutineId_Max];

#endif
